home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
MATHS
/
RLAB
/
RLAB125.ZIP
/
!RLaB
/
examples
/
memtest
< prev
next >
Wrap
Text File
|
1995-04-25
|
411b
|
21 lines
//
// Beginning of test file `test.r' (just `load(test.r)' to test the
// memory problem)
//
load("estimate.r");
rand ("uniform", 0, 1);
B = rand(10,10)/20+eye(10,10);
x = [1:10]';
f = B*x;
ans = 0;
h = [0;0;0;0;0;0;1;0;0;0];
for (i in 1:10) {
ans[i] = 0;
for (j in 1:5) {
ans[i] = ans[i] + estimate(B, f, h, 10, 2^i);
system("ps -aux | grep rlab");
}
ans[i] = ans[i] / 5
}
write("stdout",ans);